package demo25;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long N = scanner.nextLong();

        String s = String.valueOf(N);
        StringBuilder sb = new StringBuilder();

        int len = s.length();
        for (int i = 0; i < len; i++) {
            sb.append(s.charAt(i));
            if ((len-i-1)%3 == 0 && i != len-1){
                sb.append(',');
            }
        }
        System.out.println(sb.toString());
    }
}
